{extend name="layout" /}
{block name="body"}
 <div class="row">
      <div class="col-lg-12">
        <div class="card">
          <div class="card-body">
                <div class="form-group">
                    <label for="rhqq">APP客服QQ</label>
                    <input type="text" class="form-control" id="rhqq" value="{$appus.rhqq}" placeholder="请输入客服QQ号码">
                </div>
              <div class="form-group">
                <label for="rhqun">APP官方群KEY（请千万QQ群官网获取安卓KEY）</label>
                <input type="text" class="form-control" id="rhqun" value="{$appus.rhqun}" placeholder="请输入官方群KEY">
              </div>
              <div class="form-group">
                <label for="signkey">接口加密秘钥</label>
                <input type="text" class="form-control" id="signkey" value="{$appus.signkey}" placeholder="请输入软件接口加密秘钥">
              </div>
			  <div class="form-group">
			    <label for="signiv">接口加密偏移值</label>
			    <input type="text" class="form-control" id="signiv" value="{$appus.signiv}" placeholder="请输入接口加密偏移值">
			  </div>
              <button type="button" onclick="updateappus()" class="btn btn-w-sm btn-primary mb-2">提交</button>
              <button type="button" class="btn btn-default mb-2" onclick="javascript:history.back(-1);return false;">返 回
              </button>
          </div>
        </div>
      </div>
    </div>
{/block} {block name="js"}
<script type="text/javascript">
    function updateappus() {
        var l = $('body').lyearloading({
            opacity: 0.2,
            spinnerSize: 'lg',
            spinnerText: '后台处理中，请稍后...',
            textColorClass: 'text-info',
            spinnerColorClass: 'text-info'
        });
    	var rhqq = $.trim($("#rhqq").val());
    	var rhqun = $.trim($("#rhqun").val());
    	var signkey = $.trim($("#signkey").val());
    	var signiv = $.trim($("#signiv").val());
        $.ajax({
            type: "POST",
            url: "{:url('app/appus')}",
            data: {
                rhqq:rhqq,
                rhqun:rhqun,
                signiv:signiv,
                signkey:signkey
            },
            dataType: "json",
            success: function (data) {
                setTimeout(function () {
                    l.destroy();
                }, 1e3)
                if (data.code == 1) {
                    notify.success(data.msg);
                } else {
                    notify.error(data.msg);
                }
            },
            error: function () {
                l.destroy();
                notify.error("系统错误");
            }
        })
    }
</script>
{/block}